package com.example.pet.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.pet.entity.Supply;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SupplyDao  extends BaseMapper<Supply> {
//@Select("SELECT supply_name, supply_price, supply_image FROM supply ORDER BY RAND()")
    @Select("select m.merchants_name ,supply_name ,s.descrption,s.supply_price ,s.supply_image from supply s left join merchants m on m.merchants_id = s.` merchants_id` order by  rand()")
List<Supply> queryAll();

}

